<?php

/**
 * UsuarioDocente filter form base class.
 *
 * @package    sayd
 * @subpackage filter
 * @author     hylianred
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BaseUsuarioDocenteFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'nombres_docente'           => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'apellidos_docente'         => new sfWidgetFormFilterInput(),
      'seudonimo_docente'         => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'contrasenia_docente'       => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'email_docente'             => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'url_imagen'                => new sfWidgetFormFilterInput(),
      'descripcion_docente'       => new sfWidgetFormFilterInput(),
      'rut_docente'               => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'ultimo_acceso'             => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => false)),
      'ultima_modificacion_datos' => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
    ));

    $this->setValidators(array(
      'nombres_docente'           => new sfValidatorPass(array('required' => false)),
      'apellidos_docente'         => new sfValidatorPass(array('required' => false)),
      'seudonimo_docente'         => new sfValidatorPass(array('required' => false)),
      'contrasenia_docente'       => new sfValidatorPass(array('required' => false)),
      'email_docente'             => new sfValidatorPass(array('required' => false)),
      'url_imagen'                => new sfValidatorPass(array('required' => false)),
      'descripcion_docente'       => new sfValidatorPass(array('required' => false)),
      'rut_docente'               => new sfValidatorPass(array('required' => false)),
      'ultimo_acceso'             => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
      'ultima_modificacion_datos' => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 00:00:00')), 'to_date' => new sfValidatorDateTime(array('required' => false, 'datetime_output' => 'Y-m-d 23:59:59')))),
    ));

    $this->widgetSchema->setNameFormat('usuario_docente_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'UsuarioDocente';
  }

  public function getFields()
  {
    return array(
      'id_docente'                => 'Number',
      'nombres_docente'           => 'Text',
      'apellidos_docente'         => 'Text',
      'seudonimo_docente'         => 'Text',
      'contrasenia_docente'       => 'Text',
      'email_docente'             => 'Text',
      'url_imagen'                => 'Text',
      'descripcion_docente'       => 'Text',
      'rut_docente'               => 'Text',
      'ultimo_acceso'             => 'Date',
      'ultima_modificacion_datos' => 'Date',
    );
  }
}
